package com.honey.mybatis.generator.entity.method;

import com.honey.compilation.java.AbstractJavaCompilation;
import com.honey.compilation.java.MethodDecoration;
import com.honey.core.dbmapping.introspect.IntrospectSchema;
import com.honey.core.dbmapping.introspect.IntrospectSchemaColumn;
import com.honey.mybatis.generator.AbstractMethod;
import com.honey.mybatis.generator.MybatisPlugin;

public class DefaultConstructorMethod extends AbstractMethod {
	
	private static final String [] BODY = new String[]{
		"super()",
	};
	
	private static final String [] JAVA_DOC = new String[]{
		"默认的构造函数。",
	};
	
	public DefaultConstructorMethod(AbstractJavaCompilation clazz,
			MybatisPlugin belongPlugin, IntrospectSchema introspectSchema,
			IntrospectSchemaColumn introspectSchemaColumn) {
		super(clazz, belongPlugin, introspectSchema, introspectSchemaColumn);
	}

	/*
	 * (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractMethod#getMethodDecoration()
	 */
	@Override
	protected MethodDecoration getMethodDecoration() {
		MethodDecoration answer = super.getMethodDecoration();
		answer.setConstructor(true);
		return answer;
	}

	/*
	 * (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractMethod#getMethodName()
	 */
	@Override
	protected String getMethodName() {
		String answer = null ;
		answer = clazz.getType().getShortName();
		return answer ;
	}

	/*
	 * (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractMethod#getBody()
	 */
	@Override
	protected String[] getBody() {
		return BODY;
	}

	/*
	 * (non-Javadoc)
	 * @see com.honey.mybatis.generator.AbstractMethod#getJavaDoc()
	 */
	@Override
	protected String[] getJavaDoc() {
		return JAVA_DOC;
	}

}
